var e,
  t = require('../../@babel/runtime/helpers/defineProperty'),
  n = require('../../@babel/runtime/helpers/regeneratorRuntime'),
  a = require('../../@babel/runtime/helpers/objectSpread2'),
  i = require('../../@babel/runtime/helpers/asyncToGenerator'),
  r = getApp(),
  // u = requirePlugin('rp-components'),
  p = {
    community: {
      icon: '/images/center/community.png',
      url: '/packageInformation/pages/index/index',
    },
    logistics: {
      icon: '/images/center/wait-receive.png',
      url: '/pages/webview/webview?route=expressNotice',
    },
    pintuan: {
      icon: '/images/center/pingtuan.png',
      url: '/pages/center/myPingtuan/myPingtuan',
    },
    prize: { icon: '/images/center/serviceList_d.png' },
    address: {
      icon: '/images/center/serviceList_0.png',
      url: '/pages/addressList/addressList?cameFrom=center',
    },
    browse: {
      icon: '/images/center/serviceList_8.png',
      url: '/pages/center/footPrints/footPrints',
    },
    service: {
      icon: '/images/center/serviceList_2.png',
      url: '/pages/webview/webview?route=contact',
    },
    download: {
      icon: 'https://static.weizhegouquanqiufuwuzhongxin.com/1617093338692.png',
      url: '',
      tapFuntionName: 'handleDownloadApp',
    },
    setting: {
      icon: '/images/center/serviceList_4.png',
      url: '/pages/Seting/index/index',
    },
    prescription: {
      icon: '/images/center/server-medicine.png',
      url: '/pages/webview/webview?route=medicine/prescription',
    },
    spit: {
      icon: '/images/center/tcfk_icon.png',
      url: '/pages/webview/webview?route=feedbackIndex',
    },
    whome: {
      icon: '/images/center/serviceList_w.png',
      url: '/pages/webview/webview?route=weiwei',
    },
    bag: {
      icon: '/images/center/bag_icon.png',
      url: '/packageShoppingBag/pages/index/index',
    },
    message: {
      icon: '/images/center/message_icon.png',
      url: '/pages/webview/webview?route=news/index',
    },
  };
Page({
  behaviors: [],
  data: {
    statusBarHeight: r.globalData.statusBarHeight,
    navBarHeight: r.globalData.navBarHeight,
    logisticInfo: [],
    userId: 0,
    loading: !0,
    downloadTipsFlag: !1,
    personal_center_entr_switch: !1,
    microbean_show_switch: !1,
    CONFIG: r.CONFIG,
    memberStat: {},
    lucky_activity: {},
    expire_num: 0,
    memberNotify: wx.getStorageSync('user').deliver_goods_notify || {},
    memberP: wx.getStorageSync('user').memberProfile || {},
    member: wx.getStorageSync('user').member || {},
    storage_user: wx.getStorageSync('user') || {},
    accessToken: '',
    show_balance: !1,
    coupon_wei_num: 0,
    draw_notice_url: '',
    upDataing: !1,
    orderList: [
      {
        id: 0,
        icon: '/images/center/orderList_0.png',
        name: '待付款',
        url: '/packageOrder/pages/orderList/orderList?topId=1&status=1',
      },
      {
        id: 1,
        icon: '/images/center/orderList_1.png',
        name: '待发货',
        url: '/packageOrder/pages/orderList/orderList?topId=2&status=2',
      },
      {
        id: 2,
        icon: '/images/center/orderList_2.png',
        name: '待收货',
        url: '/packageOrder/pages/orderList/orderList?topId=3&status=3',
      },
      {
        id: 3,
        icon: '/images/center/orderList_3.png',
        name: '评价',
        url: '/pages/center/evaluation/evaluation',
      },
      {
        id: 4,
        icon: '/images/center/orderList_4.png',
        name: '售后服务',
        url: '/packageOrder/pages/afterSaleList/afterSaleList',
      },
    ],
    serviceList: [],
    pinTuanList: [],
    timer: 0,
  },
  onLoad: function (e) {
    //wx.getStorageSync('accessToken') && this.getLogisticInfo();
  },
  getPinTuan: function () {
    var e = this;
    return i(
      n().mark(function t() {
        var i;
        return n().wrap(function (t) {
          for (;;)
            switch ((t.prev = t.next)) {
              case 0:
                return (t.next = 2), r.$api.active.getMyGrouping();
              case 2:
                (i = t.sent),
                  e.getPinTuanProtocol(),
                  e.setData({
                    pinTuanList: i.map(function (e) {
                      return a(
                        a({}, e),
                        {},
                        {
                          gotDetail: !1,
                          seconds_remaining_format: r.util.secondsFormat(
                            e.seconds_remaining,
                          ),
                        },
                      );
                    }),
                  }),
                  e.runPinTuanCountDown(),
                  e.getPinListGoods();
              case 7:
              case 'end':
                return t.stop();
            }
        }, t);
      }),
    )();
  },
  getPinListGoods: function () {
    
  },
  runPinTuanCountDown: function () {
    
  },
  getPinTuanProtocol: function () {
    
  },
  gofile: function () {
    
  },
  getMenu: function () {
    
  },
  _getUserInfo: function (e) {

  },
  handTap: function (e) {
    
  },
  hackB: function () {},
  handleDownloadApp: function () {
    
  },
  gotTempQR: function () {
    
  },
  saveDownloadQR: function (e) {

  },
  goDraw: function () {
    
  },
  go: function (e) {
    
  },
  goWebLog: function (e) {
    
  },
  getLogisticInfo: function () {
    var e = this;
    return i(
      n().mark(function t() {
        var a;
        return n().wrap(
          function (t) {
            for (;;)
              switch ((t.prev = t.next)) {
                case 0:
                  return (
                    (t.prev = 0), (t.next = 3), r.$api.user.getLogisticInfo()
                  );
                case 3:
                  (a = t.sent), e.setData({ logisticInfo: a }), (t.next = 10);
                  break;
                case 7:
                  (t.prev = 7),
                    (t.t0 = t.catch(0)),
                    console.log('getLogisticInfo catch error: ', t.t0);
                case 10:
                case 'end':
                  return t.stop();
              }
          },
          t,
          null,
          [[0, 7]],
        );
      }),
    )();
  },
  initData: function (e) {

  },
  onReady: function () {},
  onShow: function () {},
  // onShow:
  //   ((e = i(
  //     n().mark(function e() {
  //       var a,
  //         i = this;
  //       return n().wrap(
  //         function (e) {
  //           for (;;)
  //             switch ((e.prev = e.next)) {
  //               case 0:
  //                 if (
  //                   ('function' == typeof this.getTabBar &&
  //                     this.getTabBar() &&
  //                     this.getTabBar().setData(
  //                       t(
  //                         { selected: 3 },
  //                         'list[2].tagNum',
  //                         wx.getStorageSync('__cartNum'),
  //                       ),
  //                     ),
  //                   (a = wx.getStorageSync('accessToken')),
  //                   this.setData({ accessToken: a, expire_num: 0 }),
  //                   !a)
  //                 ) {
  //                   e.next = 13;
  //                   break;
  //                 }
  //                 return (
  //                   wx.getStorageSync('accessToken'),
  //                   this.getMenu(),
  //                   (e.next = 8),
  //                   r.$api.weidou
  //                     .sign({ is_pop_up: 0 }, { errorKill: !1 })
  //                     .catch(function (e) {})
  //                 );
  //               case 8:
  //                 r.$api.user
  //                   .getMemberInfo({}, { auth: !1 })
  //                   .then(function (e) {
  //                     wx.setStorageSync('user', e),
  //                       wx.setStorageSync(
  //                         'hasPhone',
  //                         e.member.is_bing_phone ? 1 : 0,
  //                       ),
  //                       wx.setStorageSync(
  //                         'hasCode',
  //                         e.member.is_bing_generalize ? 1 : 0,
  //                       ),
  //                       i.selectComponent('#LoginC')._refresh(),
  //                       u.handLogin(
  //                         wx.getStorageSync('accessToken'),
  //                         e.member.id,
  //                         e.member.type,
  //                       ),
  //                       i.setData({
  //                         show_balance: Boolean(e.extra.show_balance || 0),
  //                         storage_user: e,
  //                         personal_center_entr_switch:
  //                           e.personal_center_entr_switch,
  //                         microbean_show_switch: e.microbean_show_switch,
  //                       });
  //                   }),
  //                   this._refreshStatus(),
  //                   this.initData(),
  //                   this.selectComponent('#FollowTips')._refresh();
  //               case 13:
  //               case 'end':
  //                 return e.stop();
  //             }
  //         },
  //         e,
  //         this,
  //       );
  //     }),
  //   )),
  //   function () {
  //     return e.apply(this, arguments);
  //   }),
  onHide: function () {},
  onUnload: function () {},
  onPullDownRefresh: function () {
   
  },
  onReachBottom: function () {},
  onShareAppMessage: function (e) {
    

  },
  copy: function (e) {
    
  },
});
